<template>
  <ct-menu-horizontal ref="horizontal" :default-active="activeIndex" router :menu-list="menuList" @select="handleSelect" />
</template>

<script>
export default {
  name: 'Nav',
  data() {
    return {
      activeIndex: '1',
      menuList: [
        {
          id: 1,
          type: 'submenu',
          index: 'base',
          lable: '基础数据管理',
          children: [
            {
              id: 2,
              type: 'item',
              index: 'Article',
              lable: '文章管理',
              route: {
                type: 'inner',
                path: { name: 'articleManage' }
              }
            }
          ]
        },
        {
          id: 11,
          type: 'item',
          index: 'orderManage',
          lable: '订单管理',
          route: {
            type: 'inner',
            path: { name: 'main' }
          }
        },
        {
          id: 39,
          type: 'item',
          index: 'home23',
          lable: '系统管理',
          route: {
            type: 'inner',
            path: { name: 'GainIframe', params: { id: '212' }}
          }
        }
      ]
    }
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
